package com.manage.wx.contorll;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.wx.menu.Button;

@Controller
@RequestMapping("/manage")
public class MenuController {


	@RequestMapping("/wx_menu")
	public ModelAndView view_instant_infoboard(ModelMap model,List<Button> buttons){
		
		
		
		return new ModelAndView("instant_Infoboard_view");
	}
	
	/**
	 * @Title: initBinder
	 * @Description: 注册日期处理
	 * @param binder
	 * @throws
	 */
	@InitBinder
	public void initBinder(WebDataBinder binder) {
		SimpleDateFormat dateFormat = new SimpleDateFormat(
				"yyyy-MM-dd HH:mm:ss");
		dateFormat.setLenient(false);
		binder.registerCustomEditor(Date.class, new CustomDateEditor(
				dateFormat, false));
	}
}
